package com.dragon.logical.service.auth;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.common.constant.PlatformConstant;
import com.dragon.repository.entity.Admin;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sy
 * @since 2023-06-12
 */
public interface AdminService extends IService<Admin> {

    Page<Admin> selectPage(String search,Integer departmentId, Integer page, Integer limit);

    List<Admin> selectAdminList(Integer adminId);

    void add(Admin admin);

    void update(Admin admin);

    void delete(Integer id);

    String login(String account, String phone, String password, Boolean remember, PlatformConstant platform);

    void logout(Integer id,PlatformConstant platformConstant);

    String generateKey(Integer id,PlatformConstant platformConstant);

    Admin getAdminInfo(Integer id);

    Admin getAdminInfoById(Integer id);

    Admin getAdminInfoByAccount(String account);

    void deleteAdminList(List<Integer> adminIds);

    Boolean changeState(Integer adminId, Integer state);

    void changePassword(Integer adminId,String oldPassword, String password,String confirmPassword);

    void resetPassword(List<Integer> ids);

    Integer selectAdminIdByAccountOrPhone(Object[] objects);

    /**
     * 获取用户控制台模块
     * @param id
     * @return
     */
    Admin getAdminMod(Integer id);

    //void test();
}
